@namespace Blazorise.Docs.Pages.Blog.UsingTheSelectComponent.Examples
@using System.Text.Json.Serialization

<Row>
    <Column>
        <Field>
            <Select TValue="Day" @bind-SelectedValue="@selectedDay">
                @foreach ( var enumValue in Enum.GetValues<Day>() )
                {
                    <SelectItem @key="enumValue" Value="@enumValue">@enumValue</SelectItem>
                }
            </Select>
        </Field>
    </Column>
</Row>
<Row>
    <Column>
        Selected Day is : @selectedDay.ToString("g")
    </Column>
</Row>

@code {
    public Day selectedDay;

    [Flags]
    [JsonConverter( typeof( System.Text.Json.Serialization.JsonStringEnumConverter ) )]
    public enum Day
    {
        None = 0,
        Sunday = 1,
        Monday = 2,
        Tuesday = 4,
        Wednesday = 8,
        Thursday = 16,
        Friday = 32,
        Saturday = 64
    }
}